'use strict';
const db = uniCloud.database();
const dbCmd = db.command ;
const $ = db.command.aggregate ;
const cate = db.collection("opendb-banner");

module.exports = {
	
	list : async function(res){
		var dataInDB = await cate.where({status:true}).field({
			"open_url" : 1 ,
			"title":1,
			"description":1,
			"sort":1,
			"status":1,
			"image_url":1
		}).orderBy("sort","asc").get() ;
		var list = this.find( dataInDB );
		
		return {list};
	},
}